<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Backbone Demo</title>
</head>
<body>


<script src="assets/js/lib/zepto.js"></script>
<script src="assets/js/lib/underscore.js"></script>
<script src="assets/js/lib/backbone.js"></script>

<script>
(function () {

    window.App = {
        Models: {},
        Views: {},
        Collections: {},

        init: function () {

        }
    };

    $( _.bind(App.init, App) );


    App.Models.Person = Backbone.Model.extend({
        url: 'ajax.php',

        defaults: {
            username: 'Oh, my god, the boy/girl has no name...',
            email: 'He/She doesn\'t user email...',
            description: 'no information'
        }
    });

    var person = new App.Models.Person();


    App.Collections.People = Backbone.Collection.extend({
        url: 'ajax.php',

        model: App.Models.Person
    });

    var peopleCollection = new App.Collections.People();
    peopleCollection.fetch();
    console.log(peopleCollection);


})();
</script>

</body>
</html>
